Along with the continuous development of mobile communication technologies, the rapid increase in network access speed, the increasingly intelligence of mobile terminals and the increasingly optimization of data compression technologies, mobile terminals have developed from simple communications and connection tools to multimedia intelligent platforms. Mobile streaming media is a combination of mobile communications and streaming media transmission, and conducts data transmission through a mobile network by using a streaming media technology on a mobile terminal to provide services such as video on demand, mobile video chat, mobile video monitoring, etc., to users.
Transcoding is a process of compressing an extremely large high-resolution media file (e.g., a video file) into a file/stream that is suitable for playing in certain network scenarios (such as an optical network, a WIFI network, a 3G network, etc.), on certain terminals (such as a television, a PC, a mobile phone, a PAD, etc.). Normally, the greater the size of the media file that is compressed, the more suitable the transmission thereof in a limited bandwidth environment is. However, a display quality of the media file may become worse.
Existing transcoding methods usually include setting transcoding parameters corresponding to different definitions in advance. For example, definitions may include four types: smooth definition, standard definition, high definition, and ultra high definition, and resolutions and maximum coding rates corresponding to these four definitions can be configured respectively. According to a predefined resolution and content of a media file, an instant coding rate of the media file is calculated in real time. When the instant rate is greater than a maximum coding rate corresponding to the resolution, the maximum coding rate can be used in place of the instant coding rate to avoid an occurrence of caton phenomenon of the media file, thus ensuring that the media file can be played smoothly.
When implementing a process of the present application, inventors observe that existing technologies have at least the problem as follows. An instant coding rate in the existing transcoding methods is calculated based on a preset resolution and content of a media data. The current content of the media file can be clearly played under two parameters (the preset resolution and the instant coding rate). When the instant coding rate is greater than a maximum coding rate corresponding to the resolution, the maximum coding rate is used for transcoding. Therefore, the media file is ensured to be played smoothly, while failing to ensure the resolution of the content of the media file that is currently played.